package org.ling.xuan.context;

import com.intellij.openapi.project.Project;
import lombok.Data;
import org.ling.xuan.entity.HundSonInfo;
import org.ling.xuan.entity.mo.CommonSetting;
import org.ling.xuan.entity.mo.LocalAdd;
import org.ling.xuan.entity.mo.ProjectSetting;

import java.util.ArrayList;
import java.util.List;


@Data
public class CheckPipelineContext {
    private String filePath;
    private List<Integer> checkStatus = new ArrayList<>();
    private List<String> messages = new ArrayList<>();
    private Project project;
    private HundSonInfo hundSonInfo;
    private ProjectSetting projectSetting;
    private CommonSetting commonSetting;
    private LocalAdd localAdd;

    public CheckPipelineContext(LocalAdd localAdd) {
        this.localAdd = localAdd;
    }

    public void success(String msg) {
        checkStatus.add(1);
        messages.add(msg);
    }

    public void warn(String msg) {
        checkStatus.add(2);
        messages.add(msg);
    }

    public void error(String msg) {
        checkStatus.add(0);
        messages.add(msg);
    }


}
